import { join } from 'path';
export default (api, opt = {}) => {
  const { app } = require(join(api.cwd, 'microfe.json'));
  api.modifyDefaultConfig(memo => {
    return {
      ...memo,
      base: '/',
    };
  });
  api.modifyWebpackConfig(memo => {
    memo.output.libraryTarget = 'umd';
    memo.output.library = `${app}-umi`;
    memo.output.jsonpFunction = `webpackJsonp_${app}`;
    return memo;
  });

};
